#include"../structure-binary-tree/binaryTree.h"

BinaryTree test(){
    BinaryTreeNode *p=NULL;
    BinaryTree tree= initBinaryTreeNode('a');
    p=tree;
    p->right= initBinaryTreeNode('f');
    p=p->right;
    p->right= initBinaryTreeNode('g');
    p=p->right;
    p->left= initBinaryTreeNode('h');

    p=tree;
    p->left= initBinaryTreeNode('b');
    p=p->left;
    p->right= initBinaryTreeNode('c');
    p=p->right;
    p->left= initBinaryTreeNode('d');
    p->right= initBinaryTreeNode('e');
    return tree;
}

int main(void) {
    BinaryTree tree=test();
    PreOrderTraverse(tree,0);
    printf("\nreverse:\n");
    PreOrderTraverse(tree,1);
    return 0;

}
